import java.util.Arrays;

public class Main {
    static class student implements Comparable<student>{
        int id;
        String name;

        public student(int id, String name) {
            this.id = id;
            this.name = name;
        }

        @Override
        public int compareTo(student o) {
            return this.name.compareTo(o.name);
        }

        @Override
        public String toString() {
            return "student{" +
                    "id=" + id +
                    ", name='" + name + '\'' +
                    '}';
        }
    }
    public static void main(String[] args) {
        student[] students = new student[3];
        students[0] = new student(13,"zhangsan");
        students[1] = new student(13,"lisi");
        students[2] = new student(13,"angwu");
        Arrays.sort(students);
        System.out.println(Arrays.toString(students));
    }
}